//
//  MTHomeDropdown.h
//  美团HD
//
//  Created by kongxiaopeng on 15/6/18.
//  Copyright (c) 2015年 njsk. All rights reserved.
//

#import <UIKit/UIKit.h>
@class MTHomeDropdown;
@protocol MTHomeDropdownDataSource <NSObject>
/**
 *  左边表格一共多少行
 */
- (NSInteger)numberOfRowsInMainTable:(MTHomeDropdown*)homeDropdown;

/**
 *  左边表格每一行的标题
 *  @param row          行号
 */
- (NSString*)homeDropdown:(MTHomeDropdown*)homeDropdown titleForRowInMainTable:(NSInteger)row;

/**
 *  左边表格每一行的子数据
 *  @param row          行号
 */
- (NSArray *)homeDropdown:(MTHomeDropdown *)homeDropdown subdataForRowInMainTable:(NSInteger)row;

@optional
/**
 *  左边表格每一行的图标
 *  @param row          行号
 */
- (NSString *)homeDropdown:(MTHomeDropdown *)homeDropdown iconForRowInMainTable:(NSInteger)row;
/**
 *  左边表格每一行的选中图标
 *  @param row          行号
 */
- (NSString *)homeDropdown:(MTHomeDropdown *)homeDropdown selectedIconForRowInMainTable:(NSInteger)row;


@end

@protocol MTHomeDropdownDelegate <NSObject>
@optional
- (void)homeDropdown:(MTHomeDropdown *)homeDropdown didSelectRowInMainTable:(NSInteger)row;
- (void)homeDropdown:(MTHomeDropdown *)homeDropdown didSelectRowInSubTable:(NSInteger)subrow inMainTable:(NSInteger)mainrow;
@end
@interface MTHomeDropdown : UIView
+ (instancetype)dropdown;

@property (nonatomic,weak)id<MTHomeDropdownDataSource> dataSource;
@property (nonatomic,weak)id<MTHomeDropdownDelegate> delegate;
@end
